import {QuestionCircleOutlined} from '@ant-design/icons';
import '@umijs/max';
import {Avatar, Space} from 'antd';
import {useModel} from '@umijs/max';
import defaultAvatar from '../../pages/User/assets/icon-user.jpeg';
import {AvatarDropdown} from './AvatarDropdown';

export type SiderTheme = 'light' | 'dark';
export const Question = () => {
  return (
    <div
      style={{
        display: 'flex',
        height: 26,
      }}
      onClick={() => {
        window.open('https://pro.ant.design/docs/getting-started');
      }}
    >
      <QuestionCircleOutlined/>
    </div>
  );
};

export const RightContent = () => {
  const {initialState} = useModel('@@initialState');
  const {currentUser} = initialState || {};

  return (
    <Space>
      <Avatar src={currentUser?.avatar || defaultAvatar} size="small" />
      <AvatarDropdown />
    </Space>
  );
};
